package zlatan_demo07_list

object ClassDemo03 {


  def main(args: Array[String]): Unit = {

    val list1 = List(1, 2, 3, 4)
    val list2 = List(3, 4, 5, 6)

    val list3 = list1.union(list2)

    val intersectList = list1.intersect(list2)

    val diffList = list1.diff(list2)

    println(s"list1和list2的并集${list3.distinct}")
    println(s"list1和list2的交集${intersectList}")
    println(s"list1和list2的差集${diffList}")

  }


}
